home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CD ROM Paradise Collection 4
/
CD ROM Paradise Collection 4 1995 Nov.iso
/
filutil
/
flex247x.zip
/
FLEX247
/
BCCDIFFS
next >
Wrap
Text File
|
1994-09-28
|
6KB
|
229 lines
--- misc.c Tue Jan 04 14:33:10 1994
+++ ../misc.c Wed Sep 28 18:44:32 1994
@@ -55,15 +55,19 @@
action_index += len;
}
/* allocate_array - allocate memory for an integer array of the given size */
void *allocate_array( size, element_size )
+#ifndef __BORLANDC__
int size, element_size;
+#else /* __BORLANDC__ */
+size_t size, element_size;
+#endif /* __BORLANDC__ */
{
register void *mem;
/* On 16-bit int machines (e.g., 80286) we might be trying to
* allocate more than a signed int can hold, and that won't
* work. Cheap test:
*/
@@ -634,15 +638,19 @@
}
/* reallocate_array - increase the size of a dynamic array */
void *reallocate_array( array, size, element_size )
void *array;
+#ifndef __BORLANDC__
int size, element_size;
+#else /* __BORLANDC__ */
+size_t size, element_size;
+#endif /* __BORLANDC__ */
{
register void *new_array;
/* Same worry as in allocate_array(): */
if ( size * element_size <= 0 )
flexfatal(
"attempt to increase array size by less than 1 byte" );
@@ -739,15 +747,19 @@
}
/* The following is only needed when building flex's parser using certain
* broken versions of bison.
*/
void *yy_flex_xmalloc( size )
+#ifndef __BORLANDC__
int size;
+#else /* __BORLANDC__ */
+size_t size;
+#endif /* __BORLANDC__ */
{
void *result = flex_alloc( size );
if ( ! result )
flexfatal( "memory allocation failed in yy_flex_xmalloc()" );
return result;
--- skel.c Wed Aug 03 11:38:32 1994
+++ ../skel.c Wed Sep 28 18:50:58 1994
@@ -26,15 +26,19 @@
"",
"#ifdef __cplusplus",
"",
"#include <stdlib.h>",
"%+",
"class istream;",
"%*",
+ "#ifndef __BORLANDC__",
"#include <unistd.h>",
+ "#else /* __BORLANDC__ */",
+ "#include <io.h>",
+ "#endif /* __BORLANDC__ */",
"",
"/* Use prototypes in function declarations. */",
"#define YY_USE_PROTOS",
"",
"/* The \"const\" storage-class-modifier is valid. */",
"#define YY_USE_CONST",
"",
@@ -240,16 +244,21 @@
"static int yy_start_stack_depth = 0;",
"static int *yy_start_stack = 0;",
"static void yy_push_state YY_PROTO(( int new_state ));",
"static void yy_pop_state YY_PROTO(( void ));",
"static int yy_top_state YY_PROTO(( void ));",
"%*",
"",
+ "#ifndef __BORLANDC__",
"static void *yy_flex_alloc YY_PROTO(( unsigned int ));",
"static void *yy_flex_realloc YY_PROTO(( void *, unsigned int ));",
+ "#else /* __BORLANDC__ */",
+ "static void *yy_flex_alloc YY_PROTO(( size_t ));",
+ "static void *yy_flex_realloc YY_PROTO(( void *, size_t ));",
+ "#endif /* __BORLANDC__ */",
"static void yy_flex_free YY_PROTO(( void * ));",
"",
"#define yy_new_buffer yy_create_buffer",
"",
"%% yytext/yyin/yyout/yy_state_type/yylineno etc. def's & init go here",
"",
"#ifndef yytext_ptr",
--- initscan.c Wed Aug 03 11:42:46 1994
+++ ../initscan.c Wed Sep 28 18:51:34 1994
@@ -16,15 +16,19 @@
#endif
#endif
#ifdef __cplusplus
#include <stdlib.h>
+#ifndef __BORLANDC__
#include <unistd.h>
+#else /* __BORLANDC__ */
+#include <io.h>
+#endif /* __BORLANDC__ */
/* Use prototypes in function declarations. */
#define YY_USE_PROTOS
/* The "const" storage-class-modifier is valid. */
#define YY_USE_CONST
@@ -220,16 +224,21 @@
static int yy_start_stack_ptr = 0;
static int yy_start_stack_depth = 0;
static int *yy_start_stack = 0;
static void yy_push_state YY_PROTO(( int new_state ));
static void yy_pop_state YY_PROTO(( void ));
static int yy_top_state YY_PROTO(( void ));
+#ifndef __BORLANDC__
static void *yy_flex_alloc YY_PROTO(( unsigned int ));
static void *yy_flex_realloc YY_PROTO(( void *, unsigned int ));
+#else /* __BORLANDC__ */
+static void *yy_flex_alloc YY_PROTO(( size_t ));
+static void *yy_flex_realloc YY_PROTO(( void *, size_t ));
+#endif /* __BORLANDC__ */
static void yy_flex_free YY_PROTO(( void * ));
#define yy_new_buffer yy_create_buffer
#define INITIAL 0
#define SECT2 1
#define SECT2PROLOG 2
--- flexdef.h Tue Jan 04 14:33:14 1994
+++ ../flexdef.h Wed Sep 28 18:53:44 1994
@@ -27,14 +27,25 @@
*/
/* @(#) $Header: flexdef.h,v 1.2 94/01/04 14:33:14 vern Exp $ (LBL) */
#include <stdio.h>
#include <ctype.h>
+#ifdef __BORLANDC__
+#include <malloc.h>
+
+#pragma warn -pro
+#pragma warn -rch
+#pragma warn -use
+#pragma warn -aus
+#pragma warn -par
+#pragma warn -pia
+
+#endif /* __BORLANDC__ */
#if HAVE_STRING_H
#include <string.h>
#else
#include <strings.h>
#endif
#if __STDC__
@@ -607,19 +618,29 @@
*/
extern char nmstr[MAXLINE];
extern int sectnum, nummt, hshcol, dfaeql, numeps, eps2, num_reallocs;
extern int tmpuses, totnst, peakpairs, numuniq, numdup, hshsave;
extern int num_backing_up, bol_needed;
+#ifndef __BORLANDC__
void *allocate_array PROTO((int, int));
void *reallocate_array PROTO((void*, int, int));
+#else /* __BORLANDC__ */
+void *allocate_array PROTO((size_t, size_t));
+void *reallocate_array PROTO((void*, size_t, size_t));
+#endif /* __BORLANDC__ */
+#ifndef __BORLANDC__
void *flex_alloc PROTO((unsigned int));
void *flex_realloc PROTO((void*, unsigned int));
+#else /* __BORLANDC__ */
+void *flex_alloc PROTO((size_t));
+void *flex_realloc PROTO((void*, size_t));
+#endif /* __BORLANDC__ */
void flex_free PROTO((void*));
#define allocate_integer_array(size) \
(int *) allocate_array( size, sizeof( int ) )
#define reallocate_integer_array(array,size) \
(int *) reallocate_array( (void *) array, size, sizeof( int ) )
@@ -772,15 +793,19 @@
/* Write out one section of the skeleton file. */
extern void skelout PROTO((void));
/* Output a yy_trans_info structure. */
extern void transition_struct_out PROTO((int, int));
/* Only needed when using certain broken versions of bison to build parse.c. */
+#ifndef __BORLANDC__
extern void *yy_flex_xmalloc PROTO(( int ));
+#else /* __BORLANDC__ */
+extern void *yy_flex_xmalloc PROTO(( size_t ));
+#endif /* __BORLANDC__ */
/* Set a region of memory to 0. */
extern void zero_out PROTO((char *, int));
/* from file nfa.c */